/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package oids.frontEnd.highScore;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.PrintWriter;
import javax.swing.JButton;
import javax.swing.JPanel;

/**
 *
 * @author CJ
 */
public class HighScore extends JPanel implements ActionListener{

    protected final int width = 500;
    protected final int height = 500;

    protected BufferedReader fileIn;
    protected PrintWriter fileOut;

    public HighScore(){
        initFiles();
        initGraphics();
        initComponents();
    }

    protected void initFiles(){
        try{
            this.fileIn = new BufferedReader(new FileReader("C:\\Users\\CJ\\Documents\\NetBeansProjects\\Oids\\src\\oids\\scores.txt"));
            this.fileOut = new PrintWriter(new BufferedWriter(new PrintWriter("C:\\Users\\CJ\\Documents\\NetBeansProjects\\Oids\\src\\oids\\scores.txt")));
        }catch(Exception e){
            e.printStackTrace();
        }
    }

    protected void initComponents(){
        this.setLayout(new BorderLayout());
        addHeading();
        addTextField();
        addButton();
        addScores();
    }

    protected void addHeading(){
        
    }

    public void actionPerformed(ActionEvent e){
    }

    protected void addTextField(){

    }

    protected void addButton(){
        JButton submit = new JButton("Submit");
        submit.addActionListener(this);
        submit.setActionCommand("submit");
    }

    protected void addScores(){
        
    }

    protected void initGraphics(){
        setPreferredSize(new Dimension(width, height));
        setFocusable(true);
    }

}